﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BA2009.Data.DataAccess;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Collections;
using BA2009.Entities;

namespace BA2009.Tests.Others
{
    [TestClass]
    public class ValueNameRepositoryTest
    {
        [TestMethod]
        public void TestFindAll()
        {
            ValueNameRepository<BannerType> repo = new ValueNameRepository<BannerType>();

            IEnumerable<BannerType> result= repo.FindAll();

            var test = result.ToList();

            Assert.IsNotNull(result);

            Assert.IsNotNull(test);

            Assert.AreEqual(3, test.Count);

            Assert.AreEqual(2, test[1].BannerTypeID);
            Assert.AreEqual("Chia sẻ 2", test[1].BannerTypeName);

        }
    }
}
